import { ApiVersoin } from '@/common/enums/httpEnum'

const Url = {
  // projectDetail: `${ApiVersoin.V5}/project/detail`,
  roomTypesDetail: `${ApiVersoin.V5}/room-types/detail`,
  projectDetail: `${ApiVersoin.V5}/project/detail`,
  findRoomList: `/find-room/list`,
  findFilterItem: `${ApiVersoin.V2}/find-room/filter-item`,
  getConponInfo: `/crm/reserves/get-conpon-info`,
  roomDetail: `${ApiVersoin.V2}/room/detail`,
  getReserveTimes: `/reserve-see-houses/show-on-site`,
  commitSeeHouse: `${ApiVersoin.V2}/crm/reserves/commit-see-house`,
  seeHouseParams: `/reserves/see-house-params`,
  roomTypeDetailV10: `${ApiVersoin.V10}/room-type/detail`,
}
// 点击首页单个房间
export const roomTypesDetail = (params) => uni.$uv.http.get(Url.roomTypesDetail, { params, custom: { showLoading: true } })

// 点击首页列表名称
export const projectDetail = (params) => uni.$uv.http.get(Url.projectDetail, { params, custom: { showLoading: true } })

// 获取详情中房源数据
export const findRoomList = (params) => uni.$uv.http.get(Url.findRoomList, { params, custom: { showLoading: true } })

// 获取房源入参列表
export const findFilterItem = (params) => uni.$uv.http.get(Url.findFilterItem, { params, custom: {} })

// 获取房源优惠券价格
export const getConponInfo = (params) => uni.$uv.http.get(Url.getConponInfo, { params, custom: {} })

// 获取视频房源详情
export const roomDetail = (params) => uni.$uv.http.get(Url.roomDetail, { params, custom: {} })

// 获取预约房源时间
export const getReserveTimes = (params) => uni.$uv.http.get(Url.getReserveTimes, { params, custom: {} })

// 通过 项目id 和type id 获取信息
export const seeHouseParams = (data) => uni.$uv.http.get(Url.seeHouseParams, { data, custom: { showLoading: true } })

// 保存预约时间
export const commitSeeHouse = (data) => uni.$uv.http.post(Url.commitSeeHouse, data, { custom: { showMessage: false } })
// export const commitSeeHouse = (data) => uni.$uv.http.post(Url.commitSeeHouse, { data, header: { 'Content-Type': ContentTypeEnum.JSON }, custom: { showLoading: true } })
// 推荐户型详情
export const roomTypeDetailV10 = (params) => uni.$uv.http.get(Url.roomTypeDetailV10, { params, custom: { showLoading: true } })
